package LeetCode刷题;

/**
 * @program: Java_Study
 * @author: Xiaofan
 * @createTime: 2021-11-03 16:37
 * @description: Functions of this class is
 * class Solution {
 *     private int rank=0;
 *     private int ans=-1;
 *     public int kthLargest(TreeNode root, int k) {
 *         inOrder(root,k);
 *         return ans;
 *     }
 *     public void inOrder(TreeNode root,int k){
 *         if(root!=null){
 *             inOrder(root.right,k);//找到最大值后开始回退
 *             if((++rank)==k){
 *                 ans=root.val;
 *                 return;
 *             }
 *             inOrder(root.left,k);
 *         }
 *     }
 * }
 **/
public class 二叉搜索树的第K大个节点 {

}